package com.matthew.spring.spring.aop;

import java.lang.reflect.Method;

import org.springframework.aop.MethodBeforeAdvice;
import org.springframework.aop.AfterReturningAdvice;
import org.springframework.aop.ThrowsAdvice;
import org.springframework.aop.IntroductionAdvisor;
import org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor;
import org.aopalliance.intercept.MethodInterceptor;

public class OrderBeforeAfterAdvice implements MethodBeforeAdvice,
		AfterReturningAdvice,ThrowsAdvice
		{

	@Override
	public void before(Method arg0, Object[] arg1, Object arg2)
			throws Throwable {
		// TODO Auto-generated method stub
		System.out.println("-------before");
	}

	@Override
	public void afterReturning(Object returnValue, Method method,
			Object[] args, Object target) throws Throwable {
		// TODO Auto-generated method stub
		System.out.println("-------afterReturning");
	}
	public void afterThrowing(Exception ex){
		System.out.println("-------afterThrowing");
	}
}
